import React from 'react'

function LogFilter({ year,changeYear }) {
    //创建监听changge事件的响应函数
    const changeHandler = (e) => {
      changeYear(+e.target.value)
    }
    return (
        <div>
            年份：<select value={year} onChange={changeHandler}>
                <option value="2024">2024</option>
                <option value="2023">2023</option>
                <option value="2022">2022</option>
                <option value="2021">2021</option>
                <option value="2020">2020</option>


            </select>

        </div>
    )
}

export default LogFilter